home *** CD-ROM | disk | FTP | other *** search
- /**
- Remove a file (like Unix rm).
- */
-
- bsh.help.rm = "usage: cd( path )";
-
- boolean rm( String pathname )
- {
- this.file = pathToFile( pathname );
-
- if ( file == null )
- throw new java.io.FileNotFoundException("pathname");
-
- if ( file.isDirectory() ) {
- print( pathname + "is a directory" );
- return;
- }
-
- return file.delete();
- }
-
-